export default {
    namespace: 'products',
    state:[],
    reducers:{
        'delete'(state,{payload:id}){
            console.log('delete',state,id)
            return state.filter(item => item.id!==id)
        }
    }
}

// export default {
//     namespace: 'products',
//     state: [],
//     reducers: {
//       'delete'(state, { payload: id }) {
//         return state.filter(item => item.id !== id);
//       },
//     },
//   };
  